package com.luxk.db.lock;

public interface Lock {
	
	/*
	public boolean acquire(LockType type, int id1, int id2, LockMode lockMode,
			boolean esclate, boolean nowait, long timeoutMillis);
	*/

	public boolean acquire(LockType type, int id1, int id2, LockMode lockMode,
			boolean esclate);
	public boolean acquireNoWait(LockType type, int id1, int id2,
			LockMode lockMode, boolean esclate);
	public boolean acquireTimeout(LockType type, int id1, int id2,
			LockMode lockMode, boolean esclate, long timeoutMillis);
	
	public void release(LockType type, int id1, int id2);
	
	public boolean isAcquired(int type, int id1, int id2);
	
}
